package com.shelpe.services.lexicon.service.filter.support;

import java.util.ArrayList;
import java.util.List;

import com.shelpe.services.lexicon.constants.Device;
import com.shelpe.services.lexicon.entity.AdgroupRecord;
import com.shelpe.services.lexicon.entity.KeywordRecommend;

public class BlackListKeywordRecommendFilter implements KeywordRecommendFilter {
	
	private List<String> blacks = new ArrayList<String>();
	
	public BlackListKeywordRecommendFilter(){
		blacks.add("新款");
	}

	private boolean contain(String words){
		return blacks.contains(words);
	}

	@Override
	public KeywordRecommend run(KeywordRecommend recommend, AdgroupRecord record, Device device) {
		boolean support = true;
		
		if(this.contain(recommend.getWord())){
			support  = false;
		}
		
		return support?recommend:null;
	}
}
